﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DevolveManage.aspx.cs" Inherits="Comod_StorageManage" %>
<%@ Register Src="../usercontrol/PageUrlGridView.ascx" TagName="PageUrlGridView" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
<title>商品入库</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/changerows.js"></script>
<script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript">
function CheckAll(form){
    for (var i=0;i<form.elements.length;i++) {
	    var e = form.elements[i];
	    if (e.name != 'chkall' && e.type=='checkbox')
		    e.checked = form.chkall.checked;
    }
}
function PrintData(id)
{
	if(id!="")
	{
		window.open("DevolvePrint.aspx?id="+id,"","width=800px,height=650px,left=100px,top=30px,scrollbars=yes");
	}
}
</script>
<link href="../js/loading.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="../js/loading.js" charset="gb2312"></script>
<body>
    <form id="form1" runat="server">
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="2%" height="1%">
                    <img src="../images/module.gif" width="20" height="22"></td>
                <td >
                    <asp:Label ID="lblPath" runat="server" Text="Label"></asp:Label></td>
                <td  align="right" width="10%"><div><a href="javascript:location.href=document.referrer;" ><img src="../images/history.gif" border="0" /></a></div></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
                <tr><td colspan="2" width="99%" align="right" >
                    <img src="../images/search.gif" alt="搜索"  height="16" />入库日期：<asp:TextBox
                        ID="yjTm1" runat="server" CssClass="input1" Width="80" onclick="SelectDate(this.name)"></asp:TextBox>到<asp:TextBox
                        ID="yjTm2" runat="server" CssClass="input1" Width="80" onclick="SelectDate(this.name)"></asp:TextBox>
                    品牌：<asp:TextBox ID="BrandName" runat="server" CssClass="input1" Width="60px"></asp:TextBox>型号：<asp:TextBox
                        ID="SpecificationsName" runat="server" CssClass="input1" Width="80"></asp:TextBox>型号编号：<asp:TextBox
                        ID="ComodBarcode" runat="server" CssClass="input1" Width="60px"></asp:TextBox>
                        类型：
                    <asp:DropDownList ID="TypeStocck" runat="server">
                        <asp:ListItem Value="">全部</asp:ListItem>
                        <asp:ListItem Value="1">常规机</asp:ListItem>
                        <asp:ListItem Value="2">工程机</asp:ListItem>
                        <asp:ListItem Value="3">返修机</asp:ListItem>
                        <asp:ListItem Value="4">赠品</asp:ListItem>
                    </asp:DropDownList>
                    审核：<asp:DropDownList ID="AuditState" runat="server">
                        <asp:ListItem Value="">全部</asp:ListItem>
                        <asp:ListItem>未审核</asp:ListItem>
                        <asp:ListItem>已通过</asp:ListItem>
                        <asp:ListItem>未通过</asp:ListItem>
                    </asp:DropDownList>
                        库存：<asp:DropDownList ID="stockNum" runat="server">
                        <asp:ListItem Value="">全部</asp:ListItem>
                        <asp:ListItem Value=">0">大于0</asp:ListItem>
                        <asp:ListItem Value="=0">等于0</asp:ListItem>
                        <asp:ListItem Value="<0">小于0</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnSearch" runat="server" Text="搜 索" CssClass="submit" OnClick="btnSearch_Click"  />
                    </td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="GvData" runat="server" Width="99%" AutoGenerateColumns="False"  CssClass="gridview" EmptyDataText="没有数据" OnRowDataBound="GvData_RowDataBound" >
            <RowStyle Height="25px" />
            <PagerSettings Visible="False" />
            <Columns>
                <asp:BoundField HeaderText="Id" DataField="stockId">
                        <ItemStyle HorizontalAlign="Center"/>
                </asp:BoundField>
                <asp:BoundField HeaderText="型号编号" DataField="ComodBarcode" >
                    <ItemStyle HorizontalAlign="Center"/>
                </asp:BoundField>
                <asp:BoundField HeaderText="型号" DataField="SpecificationsName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField> 
                <asp:BoundField HeaderText="收货仓库" DataField="WarehouseName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="供货商" DataField="SupplierName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="品牌" DataField="BrandName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                 <asp:BoundField HeaderText="名称" DataField="ComoditiesName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField> 
                 <asp:BoundField HeaderText="类型" DataField="typeStock" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>                
                <asp:BoundField HeaderText="数量" DataField="ProcNum" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>             
                <asp:BoundField HeaderText="总数" DataField="countNum" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
              <asp:BoundField HeaderText="已售" DataField="saleNum" >
                    <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
              <asp:BoundField HeaderText="库存" DataField="stockNum" >
                    <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
           <asp:TemplateField HeaderText="采购价">
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text= '<%# Bind("ProcMoney","{0:f2}") %>'></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:BoundField HeaderText="操作日期" DataField="storageTime">
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField HeaderText="操作人" DataField="EditUserName">
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField HeaderText="审核状态" DataField="AuditState">
                <ItemStyle ForeColor="Red" HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkbtnEdit" CommandArgument='<%#Eval("stockId") %>' runat="server" OnClick="linkbtnUpdate_Click">转库</asp:LinkButton><a href="javascript:PrintData(<%#Eval("stockId")%>)">打印</a>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            </Columns>
            <EmptyDataRowStyle  HorizontalAlign="Center" />
        </asp:GridView>
        <table width="99%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td align="center">
                  <uc1:PageUrlGridView ID="PageNavigator1" runat="server" DataId="GvData" ConnectionString="connstr" ShowType="Num" PageSize="20" />
                </td>
            </tr>
        </table>
        <asp:HiddenField ID="HFroid" runat="server" />
        <asp:HiddenField ID="hfxs" runat="server" />
    </form>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
 senfe("GvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>
